<template>
  <div>
    <el-row>
      <el-col :span="12">
        <h2>个人中心</h2>
        <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            background-color="#F4F3F4"
            text-color="#545C64"
            active-text-color="#ED3931">
          <el-menu-item index="1" @click="toMyOrder()">
            <i class="el-icon-menu"></i>
            <span slot="title">我的订单</span>
          </el-menu-item>
          <el-menu-item index="2" @click="toBasic()">
            <i class="el-icon-document"></i>
            <span slot="title">基础信息</span>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "NavMenu",
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    //我的订单路由跳转
    toMyOrder() {
      this.$router.push({name: 'meOrder'})
    },
    //基础信息路由跳转
    toBasic() {
      this.$router.push({name: 'basicInfo'})
    }
  },
  data() {
    return {}
  },
}
</script>

<style scoped>
</style>
